package cn.com.nes.mybatis.agent.ope.mapper;

import cn.com.nes.mybatis.agent.ope.entity.IsDeviceProtocolInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 设备协议表 Mapper 接口
 * </p>
 *
 * @author nes
 * @since 2023-02-28
 */
public interface IsDeviceProtocolInfoMapper extends BaseMapper<IsDeviceProtocolInfo> {
    int getEquipmentCount(String protocolId);

    List<Map<String, Object>> getProtocols(Page<Map<String, Object>> page,
                                           @Param("protocolId") String protocolId,
                                           @Param("protocolName") String protocolName,
                                           @Param("hasNormalDataItem") Integer hasNormalDataItem,
                                           @Param("manufactureId") String nes_companyId,
                                           @Param("companyId") String companyId);


    void logicDeleteByBusinessKeyAndUpdateVersion(@Param("protocolId") String protocolId, @Param("version") long version);

}
